package o;

import android.content.Context;
import com.huawei.appgallery.appcomment.api.CommentReplyActivityProtocol;
import com.huawei.appgallery.appcomment.api.UserCommentListActivityProtocol;
import com.huawei.appgallery.appcomment.api.UserCommentListActivityProtocol.Request;
import com.huawei.appgallery.forum.base.card.bean.User;
import com.huawei.appgallery.forum.comments.api.ICommentDetailProtocol;
import com.huawei.appgallery.forum.message.api.IMessageDetailProtocol;
import com.huawei.appgallery.forum.option.api.ICommentReplyActivityProtocol;
import com.huawei.appgallery.forum.posts.api.IPostDetailProtocol;
import com.huawei.appgallery.forum.user.api.IUserHomePageProtocol;

public class bwy {
    private static bwy ॱ = new bwy();

    public static bwy ˏ() {
        return ॱ;
    }

    public void ˏ(Context context, String str, int i, String str2) {
        fjb ˎ = fho.ˏ().ˋ("Message").ˎ("message_detail_activity");
        IMessageDetailProtocol iMessageDetailProtocol = (IMessageDetailProtocol) ˎ.ˊ();
        iMessageDetailProtocol.setType(i);
        iMessageDetailProtocol.setUri(str2);
        iMessageDetailProtocol.setDomainId(str);
        fiu.ˊ().ˏ(context, ˎ);
    }

    public void ˋ(Context context, String str, int i, String str2) {
        fjb ˎ = fho.ˏ().ˋ("Comments").ˎ("comment.detail.activity");
        ICommentDetailProtocol iCommentDetailProtocol = (ICommentDetailProtocol) ˎ.ˊ();
        iCommentDetailProtocol.setUri(str);
        if (i != 0) {
            iCommentDetailProtocol.setErrorCode(i);
        }
        iCommentDetailProtocol.setSourceType(2);
        iCommentDetailProtocol.setNeedComment(false);
        iCommentDetailProtocol.setDomainId(str2);
        fiu.ˊ().ˏ(context, ˎ);
    }

    public void ॱ(Context context, User user, int i, long j, String str) {
        fjb ˎ = fho.ˏ().ˋ("Option").ˎ("option.reply.comment");
        ICommentReplyActivityProtocol iCommentReplyActivityProtocol = (ICommentReplyActivityProtocol) ˎ.ˊ();
        iCommentReplyActivityProtocol.setPid(j);
        iCommentReplyActivityProtocol.setDomainId(str);
        if (i == 1) {
            iCommentReplyActivityProtocol.setToUid("");
        } else if (i == 2 || i == 3) {
            iCommentReplyActivityProtocol.setToUid(user.ॱ());
            iCommentReplyActivityProtocol.setToUserName(user.ˋ());
        }
        fiu.ˊ().ˏ(context, ˎ);
    }

    public void ˊ(Context context, User user, int i, String str, String str2, String str3) {
        fjb ˎ = fho.ˏ().ˋ("Option").ˎ("option.reply.comment");
        ICommentReplyActivityProtocol iCommentReplyActivityProtocol = (ICommentReplyActivityProtocol) ˎ.ˊ();
        iCommentReplyActivityProtocol.setCommentId(str);
        iCommentReplyActivityProtocol.setReplyId(str2);
        iCommentReplyActivityProtocol.setType(i);
        iCommentReplyActivityProtocol.setDomainId(str3);
        iCommentReplyActivityProtocol.setToUid(user.ॱ());
        iCommentReplyActivityProtocol.setToUserName(user.ˋ());
        fiu.ˊ().ˏ(context, ˎ);
    }

    public void ˎ(Context context, String str, int i, String str2) {
        fjb ˎ = fho.ˏ().ˋ("Posts").ˎ("post.detail.activity");
        IPostDetailProtocol iPostDetailProtocol = (IPostDetailProtocol) ˎ.ˊ();
        iPostDetailProtocol.setUri(str);
        iPostDetailProtocol.setDomainId(str2);
        if (i != 0) {
            iPostDetailProtocol.setErrorCode(i);
        }
        fiu.ˊ().ˏ(context, ˎ);
    }

    public void ˊ(Context context, String str, int i, String str2) {
        fjb ˎ = fho.ˏ().ˋ("User").ˎ("UserHomePageActivity");
        IUserHomePageProtocol iUserHomePageProtocol = (IUserHomePageProtocol) ˎ.ˊ();
        iUserHomePageProtocol.setUri("forum|user_detail");
        iUserHomePageProtocol.setUserId(str);
        iUserHomePageProtocol.setType(i);
        iUserHomePageProtocol.setDomainId(str2);
        fiu.ˊ().ˏ(context, ˎ);
    }

    public static void ˎ(String str, Context context) {
        cjo userCommentListActivityProtocol = new UserCommentListActivityProtocol();
        Request request = new Request();
        request.ˏ(str);
        userCommentListActivityProtocol.ˎ(request);
        cjk.ˎ().ˋ(context, new cjm("usercomment.activity", userCommentListActivityProtocol));
    }

    public static void ˏ(Context context, String str) {
        cjo commentReplyActivityProtocol = new CommentReplyActivityProtocol();
        CommentReplyActivityProtocol.Request request = new CommentReplyActivityProtocol.Request();
        String[] split = str.split("\\|");
        if (split.length >= 3) {
            String str2 = split[1];
            String str3 = split[2];
            request.ˏ(str2);
            request.ˊ(str3);
            commentReplyActivityProtocol.ˏ(request);
            cjk.ˎ().ˋ(context, new cjm("appdetailreply.activity", commentReplyActivityProtocol));
        }
    }
}
